<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>BNF for MAS2JavaParser.jcc</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=CENTER>BNF for MAS2JavaParser.jcc</H1>
<H2 ALIGN=CENTER>TOKENS</H2>
<TABLE>
 <!-- Token -->
 <TR>
  <TD>
   <PRE>
&lt;DEFAULT&gt; SKIP : {
" "
| "\t"
| "\n"
| "\r"
| &lt;"//" (~["\n","\r"])* ("\n" | "\r" | "\r\n")&gt;
| &lt;"/*" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/"&gt;
}

   </PRE>
  </TD>
 </TR>
 <!-- Token -->
 <TR>
  <TD>
   <PRE>
&lt;DEFAULT&gt; TOKEN : {
&lt;MAS: "MAS"&gt;
| &lt;AGS: "agents"&gt;
| &lt;ENV: "environment"&gt;
| &lt;CONTROL: "executionControl"&gt;
| &lt;AT: "at"&gt;
| &lt;INFRA: "infrastructure"&gt;
| &lt;CLASSPATH: "classpath"&gt;
| &lt;SOURCEPATH: "aslSourcePath"&gt;
| &lt;ASOEE: "events"&gt;
| &lt;ASOEEV: "discard" | "requeue" | "retrieve"&gt;
| &lt;ASOIB: "intBels"&gt;
| &lt;ASOIBV: "sameFocus" | "newFocus"&gt;
| &lt;ASONRC: "nrcbp"&gt;
| &lt;ASOV: "verbose"&gt;
| &lt;DIRECTIVE: "directives"&gt;
| &lt;ASOSYNC: "synchronised"&gt;
| &lt;ASOBOOL: "true" | "false"&gt;
| &lt;ASAGCLASS: "agentClass"&gt;
| &lt;ASAGARCHCLASS: "agentArchClass"&gt;
| &lt;BBCLASS: "beliefBaseClass"&gt;
| &lt;NUMBER: ["0"-"9"] (["0"-"9"])*&gt;
| &lt;STRING: "\"" (~["\"","\\","\n","\r"] | "\\" (["n","t","b","r","f","\\","\'","\""] | ["0"-"7"] (["0"-"7"])? | ["0"-"3"] ["0"-"7"] ["0"-"7"]))* "\""&gt;
| &lt;ASID: &lt;LC_LETTER&gt; (&lt;LETTER&gt; | &lt;DIGIT&gt; | "_")*&gt;
| &lt;ID: &lt;LETTER&gt; (&lt;LETTER&gt; | &lt;DIGIT&gt; | "_")*&gt;
| &lt;PATH: ("./" | "/" | "\\" | &lt;DRIVER&gt;) ((&lt;LETTER&gt; | &lt;DIGIT&gt; | "_")* ("/" | "\\"))*&gt;
| &lt;DRIVER: &lt;LETTER&gt; ":"&gt;
| &lt;LETTER: &lt;LC_LETTER&gt; | &lt;UP_LETTER&gt;&gt;
| &lt;LC_LETTER: ["a"-"z"]&gt;
| &lt;UP_LETTER: ["A"-"Z"]&gt;
| &lt;DIGIT: ["0"-"9"]&gt;
}

   </PRE>
  </TD>
 </TR>
</TABLE>
<H2 ALIGN=CENTER>NON-TERMINALS</H2>
<TABLE>
 <!-- Special token -->
 <TR>
  <TD>
<PRE>
/* Configuration Grammar */</PRE>
  </TD>
 </TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod1">mas</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>&lt;MAS&gt; &lt;ASID&gt; "{" <A HREF="#prod2">infra</A> <A HREF="#prod3">environment</A> <A HREF="#prod4">control</A> <A HREF="#prod5">agents</A> <A HREF="#prod6">directives</A> <A HREF="#prod7">classpath</A> <A HREF="#prod8">sourcepath</A> "}"</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod2">infra</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;INFRA&gt; ":" <A HREF="#prod9">classDef</A> )?</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod5">agents</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>&lt;AGS&gt; ":" ( <A HREF="#prod10">agent</A> )+</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod10">agent</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>&lt;ASID&gt; ( <A HREF="#prod11">fileName</A> )? <A HREF="#prod12">ASoptions</A> ( &lt;ASAGARCHCLASS&gt; <A HREF="#prod9">classDef</A> | &lt;ASAGCLASS&gt; <A HREF="#prod9">classDef</A> | &lt;BBCLASS&gt; <A HREF="#prod9">classDef</A> | "#" &lt;NUMBER&gt; | &lt;AT&gt; &lt;STRING&gt; )* ";"</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod11">fileName</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;PATH&gt; )? &lt;ASID&gt; ( "." &lt;ASID&gt; )?</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod9">classDef</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;ID&gt; | &lt;ASID&gt; ) ( "." ( &lt;ID&gt; | &lt;ASID&gt; ) )* ( "(" ( ( <A HREF="#prod13">parameter</A> ) ( "," ( <A HREF="#prod13">parameter</A> ) )* )? ")" )?</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod13">parameter</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod9">classDef</A> | &lt;NUMBER&gt; | &lt;STRING&gt; | <A HREF="#prod14">listParameters</A> )</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod14">listParameters</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>"[" ( <A HREF="#prod13">parameter</A> ) ( "," <A HREF="#prod13">parameter</A> )* "]"</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod12">ASoptions</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( "[" <A HREF="#prod15">procOption</A> ( "," <A HREF="#prod15">procOption</A> )* "]" )?</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod15">procOption</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;ASOEE&gt; "=" &lt;ASOEEV&gt; | &lt;ASOIB&gt; "=" &lt;ASOIBV&gt; | &lt;ASOSYNC&gt; "=" &lt;ASOBOOL&gt; | &lt;ASONRC&gt; "=" &lt;NUMBER&gt; | &lt;ASOV&gt; "=" &lt;NUMBER&gt; | &lt;ASID&gt; "=" ( &lt;STRING&gt; | &lt;ASID&gt; | &lt;NUMBER&gt; | &lt;ID&gt; ) )</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod3">environment</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;ENV&gt; ":" <A HREF="#prod9">classDef</A> ( &lt;AT&gt; &lt;STRING&gt; )? )?</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod4">control</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;CONTROL&gt; ":" <A HREF="#prod9">classDef</A> ( &lt;AT&gt; &lt;STRING&gt; )? )?</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod7">classpath</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;CLASSPATH&gt; ":" ( &lt;STRING&gt; ";" )+ )?</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod8">sourcepath</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;SOURCEPATH&gt; ":" ( &lt;STRING&gt; ";" )+ )?</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod6">directives</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;DIRECTIVE&gt; ":" ( &lt;ASID&gt; "=" <A HREF="#prod9">classDef</A> ";" )+ )?</TD>
</TR>
</TABLE>
</BODY>
</HTML>
